﻿using AnesSystem.ViewModels;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Navigation;
using System.Windows.Shapes;

namespace AnesSystem.Controls.Operation.CQ.CQTL
{
    /// <summary>
    /// AnesDocSignatureCtrl.xaml 的交互逻辑
    /// </summary>
    public partial class AnesDocSignatureCtrl : UserControl
    {
        public AnesDocSignatureCtrl()
        {
            InitializeComponent();
            this.DataContext = AnesDocSignatureCtrlViewModel.Instance;
            this.Loaded += AnesDocSignatureCtrl_Loaded;
        }

        private void AnesDocSignatureCtrl_Loaded(object sender, RoutedEventArgs e)
        {
            AnesDocSignatureCtrlViewModel.Instance.Load_page();
            DataManager.Instance.CurrentPatientLink.AnesthesiaRecord.Jbys1StartTime.ToString(DateFormat.DATE_FORMAT_STR_YMDHM);

        }

        private void BindTextCtrl_MouseDown(object sender, MouseButtonEventArgs e)
        {
            AnesDocSignatureCtrlViewModel.Instance.AnesDoctorTanChu();
        }

        private void _testNurse_MouseDown(object sender, MouseButtonEventArgs e)
        {
            AnesDocSignatureCtrlViewModel.Instance.NurseTanChu();
        }

        private void _cruisingNurse_MouseDown(object sender, MouseButtonEventArgs e)
        {
            AnesDocSignatureCtrlViewModel.Instance.CruisingNurseTanChu();
        }

        private void _operation_MouseDown(object sender, MouseButtonEventArgs e)
        {

            AnesDocSignatureCtrlViewModel.Instance.OperationTanChu();
        }

        private void jbsj_GotFocus(object sender, RoutedEventArgs e)
        {
            CusDatePickerWin cusDatePicker = new CusDatePickerWin();
            cusDatePicker.SelectedDateTime = DateTime.Now;

            cusDatePicker.ShowDialog();

            if (cusDatePicker.Result)
            {
                //jbsj.Value = cusDatePicker.SelectedDateTime;//2005年11月5日
            }
        }
    }
}
